#! /bin/bash

echo "此脚本递归读取目录及其子目录。使用方法：./readthrough 目录名"

function read_dir(){
    for file in `ls $1`
    do
        if [ -d $1"/"$file ]
        then
            read_dir $1"/"$file
        else
            echo $1"/"$file
        fi
    done
}

read_dir $1